home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / usr / include / scribus-ng / smtextstyles.h < prev    next >
Encoding:
C/C++ Source or Header  |  2009-02-04  |  4.5 KB  |  177 lines

  1. /*
  2. For general Scribus (>=1.3.2) copyright and licensing information please refer
  3. to the COPYING file provided with the program. Following this notice may exist
  4. a copyright and/or license notice that predates the release of Scribus 1.3.2
  5. for which a new license (GPL+exception) is in place.
  6. */
  7.  
  8. #ifndef SMTEXTSTYLES_H
  9. #define SMTEXTSTYLES_H
  10.  
  11. #include "styleitem.h"
  12. #include "styles/styleset.h"
  13. #include "styles/paragraphstyle.h"
  14.  
  15. class CharStyle;
  16. class ScribusDoc;
  17. class SMCStyleWidget;
  18. class SMPStyleWidget;
  19.  
  20. class SMParagraphStyle : public StyleItem
  21. {
  22.     Q_OBJECT
  23. public:
  24.     SMParagraphStyle(StyleSet<CharStyle> *cstyles);
  25.     ~SMParagraphStyle();
  26.  
  27.     QTabWidget* widget();
  28.     QString typeNamePlural();
  29.     QString typeNameSingular();
  30.     void setCurrentDoc(ScribusDoc *doc);
  31.     QList<StyleName> styles(bool reloadFromDoc = true);
  32.     void reload();
  33.     void selected(const QStringList &styleNames);
  34.     QString fromSelection() const;
  35.     void toSelection(const QString &styleName) const;
  36.     QString newStyle();
  37.     QString newStyle(const QString &fromStyle);
  38.     void apply();
  39.     void editMode(bool isOn);
  40.     bool isDefaultStyle(const QString &stylename) const;
  41.     void setDefaultStyle(bool ids);
  42.     QString shortcut(const QString &stylename) const;
  43.     void setShortcut(const QString &shortcut);
  44.     void deleteStyles(const QList<RemoveItem> &removeList);
  45.     void nameChanged(const QString &newName);
  46.     QString getUniqueName(const QString &name);
  47.     void languageChange();
  48.     void unitChange();
  49.     StyleSet<ParagraphStyle>* tmpStyles(); // butt ugly
  50.  
  51. signals:
  52.     void selectionDirty();
  53.  
  54. private:
  55.     SMPStyleWidget *pwidget_;
  56.     ScribusDoc *doc_;
  57.     bool selectionIsDirty_;
  58.     double unitRatio_;
  59.     StyleSet<ParagraphStyle> tmpStyles_;
  60.     StyleSet<CharStyle> *cstyles_;
  61.     QList<ParagraphStyle*> selection_;
  62.     QList<RemoveItem> deleted_;
  63.  
  64.     void setupConnections();
  65.     void removeConnections();
  66.     void updateStyleList();
  67.     void reloadTmpStyles();
  68.     QList<CharStyle> getCharStyles();
  69.  
  70. private slots:
  71.     // pstyle
  72.     void slotLineSpacingMode(int mode);
  73.     void slotLineSpacing();
  74.     void slotParentDropCap();
  75.     void slotDropCap(bool isOn);
  76.     void slotDropCapLines(int lines);
  77.     void slotDropCapOffset();
  78.     void slotSpaceAbove();
  79.     void slotSpaceBelow();
  80.     void slotAlignment();
  81.     void slotOpticalMargin(int i);
  82.     void slotOpticalMarginSelector();
  83.     void slotParentOpticalMargin();
  84.     void slotMinSpace();
  85.     void slotMinGlyphExt();
  86.     void slotMaxGlyphExt();
  87.     void slotTabRuler();
  88.     void slotLeftIndent();
  89.     void slotRightIndent();
  90.     void slotFirstLine();
  91.     // cstyle
  92.     void slotFontSize();
  93.     void slotEffects(int e);
  94.     void slotEffectProperties();
  95.     void slotFillColor();
  96.     void slotFillShade();
  97.     void slotStrokeColor();
  98.     void slotStrokeShade();
  99.     void slotLanguage();
  100.     void slotScaleH();
  101.     void slotScaleV();
  102.     void slotTracking();
  103.     void slotWordTracking();
  104.     void slotBaselineOffset();
  105.     void slotFont(QString s);
  106.     void slotParentChanged(const QString &parent);
  107.     void slotCharParentChanged(const QString &parent);
  108. };
  109.  
  110. class SMCharacterStyle : public StyleItem
  111. {
  112.     Q_OBJECT
  113. public:
  114.     SMCharacterStyle();
  115.     ~SMCharacterStyle();
  116.  
  117.     QTabWidget* widget();
  118.     QString typeNamePlural();
  119.     QString typeNameSingular();
  120.     void setCurrentDoc(ScribusDoc *doc);
  121.     QList<StyleName> styles(bool reloadFromDoc = true);
  122.     void reload();
  123.     void selected(const QStringList &styleNames);
  124.     QString fromSelection() const;
  125.     void toSelection(const QString &styleName) const;
  126.     QString newStyle();
  127.     QString newStyle(const QString &fromStyle);
  128.     void apply();
  129.     void editMode(bool isOn);
  130.     bool isDefaultStyle(const QString &stylename) const;
  131.     void setDefaultStyle(bool ids);
  132.     QString shortcut(const QString &stylename) const;
  133.     void setShortcut(const QString &shortcut);
  134.     void deleteStyles(const QList<RemoveItem> &removeList);
  135.     void nameChanged(const QString &newName);
  136.     QString getUniqueName(const QString &name);
  137.     void languageChange();
  138.     void unitChange();
  139.     StyleSet<CharStyle>* tmpStyles();
  140.  
  141. signals:
  142.     void selectionDirty();
  143.  
  144. private:
  145.     QTabWidget   *widget_;
  146.     SMCStyleWidget *page_;
  147.     ScribusDoc   *doc_;
  148.     StyleSet<CharStyle> tmpStyles_;
  149.     QList<CharStyle*> selection_;
  150.     QList<RemoveItem> deleted_;
  151.     bool selectionIsDirty_;
  152.  
  153.     void reloadTmpStyles();
  154.     void setupConnections();
  155.     void removeConnections();
  156.  
  157. private slots:
  158.     void slotFontSize();
  159.     void slotEffects(int e);
  160.     void slotEffectProperties();
  161.     void slotFillColor();
  162.     void slotFillShade();
  163.     void slotStrokeColor();
  164.     void slotStrokeShade();
  165.     void slotLanguage();
  166.     void slotScaleH();
  167.     void slotScaleV();
  168.     void slotTracking();
  169.     void slotWordTracking();
  170.     void slotBaselineOffset();
  171.     void slotFont(QString s);
  172.     void slotParentChanged(const QString &parent);
  173.  
  174. };
  175.  
  176. #endif
  177.